package cn.diancan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import cn.diancan.util.DateUtil;


@Entity
@Table(name="ShopClerk",uniqueConstraints = {@UniqueConstraint(columnNames={"jobNumber"})}) 
public class ShopClerk {
    
    private Long id;//编号
    private String jobNumber;
    //private Long shopId; 
    private String clerkName;
    private String createTime;
    private String entryTime; //入职时间
    private String remark;
    private Integer isDelete;
    private Integer version;
    private long lastUpdateTimeStamp;//真实数据需要
    
    @Version
    @Column(name="OPTLOCK",columnDefinition="int(11) DEFAULT 0")
    public Integer getVersion() {
        return version;
    }
    public void setVersion(Integer version) {
        this.version = version;
    }
    
    
    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    @Column(columnDefinition="VARCHAR(32)")
    public String getJobNumber() {
        return jobNumber;
    }
    public void setJobNumber(String jobNumber) {
        this.jobNumber = jobNumber;
    }
   /* public Long getShopId() {
        return shopId;
    }
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    } */
    public String getClerkName() {
        return clerkName;
    }
    public void setClerkName(String clerkName) {
        this.clerkName = clerkName;
    }
    public Integer getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
    @Column(columnDefinition="DATETIME")
    public String getCreateTime() {
        return DateUtil.getMysqlDateTime(createTime);
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    @Column(columnDefinition="DATETIME")
    public String getEntryTime() {
	 return DateUtil.getMysqlDateTime(entryTime);
    }
    public void setEntryTime(String entryTime) {
        this.entryTime = entryTime;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public long getLastUpdateTimeStamp() {
        return lastUpdateTimeStamp;
    }
    public void setLastUpdateTimeStamp(long lastUpdateTimeStamp) {
        this.lastUpdateTimeStamp = lastUpdateTimeStamp;
    }
    
    
    
    

}
